
<template>
    <div class="app-container">
        <elTable ref="dataInfo" :enterSearch="true" :formData="formData" @tableData="getList">
            <el-table-column prop="logo" label="logo" align="center"></el-table-column>
            <el-table-column prop="name" label="名称" align="center"></el-table-column>
            <el-table-column prop="telphone" label="联系方式" align="center"></el-table-column>
            <el-table-column prop="address" label="地址" align="center"></el-table-column>
            <el-table-column label="操作" align="center">
                <template slot-scope="{row,$index}">
                    <el-button type="primary" size="mini" @click.native="introduction(row)">简介</el-button>
                </template>
            </el-table-column>
        </elTable>
    </div>
</template>

<script>
import elTable from "@/components/xForm/elTable";
import apisShopIntroduction from "@/api/shopDecoration/shopIntroduction"; //店铺简介接口
export default {
    name: "shopIntroduction",
    components: {
        elTable,
        apisShopIntroduction,
    },
    data() {
        return {
            formData: {
                name: "",
                logo:"",
                telphone:"",
                address:"",
                currentPage: 1,
                pageSize: 10,
            },
            dataInfo: [],
        };
    },
    mounted() {
        // this.dataInfo = this.$refs.dataInfo;
    },
    methods: {
        getList(pageNo) {
            let _this = this;
            _this.formData.currentPage = pageNo || _this.formData.currentPage;
            let dataInfo = [
                {
                    id: 1,
                    name: "路飞",
                },
                {
                    id: 2,
                    name: "索隆",
                },
            ];
            let total = 10;
            this.$nextTick(() => {
                this.$refs.dataInfo.loadData(dataInfo, total);
            });
            // apisShopIntroduction.shopIntroductionList(this.formData).then((d) => {
            //     this.table.loadData(d.data.list, d.data.total); //调用组件刷新表格
            // });
        },
        // 简介
        introduction(row){
            this.$router.push('/shopDecoration/introductionDetail')
        }
    },
};
</script>

